<?php
//连接数据库
$link = mysqli_connect("localhost","root","root","2116");

//接受id 
$id = $_GET['id'];

//删除的sql
$sql = "DELETE FROM students WHERE id=$id";
mysqli_query($link,$sql);
    if(mysqli_affected_rows($link)){
        echo "<script>alert('删除成功'); window.location.href='./index.php'</script>";
    }else{
        echo "删除失败";
    }




?>